package com.ruoyi.project.channel.payerBusinessInfo.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.channel.payerBusinessInfo.mapper.PayerBusinessInfoMapper;
import com.ruoyi.project.channel.payerBusinessInfo.domain.PayerBusinessInfo;
import com.ruoyi.project.channel.payerBusinessInfo.service.IPayerBusinessInfoService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 支付商商户 服务层实现
 * 
 * @author CAIN
 * @date 2019-06-29
 */
@Service
public class PayerBusinessInfoServiceImpl implements IPayerBusinessInfoService 
{
	@Autowired
	private PayerBusinessInfoMapper payerBusinessInfoMapper;

	/**
     * 查询支付商商户信息
     * 
     * @param payerBusinessId 支付商商户ID
     * @return 支付商商户信息
     */
    @Override
	public PayerBusinessInfo selectPayerBusinessInfoById(Long payerBusinessId)
	{
	    return payerBusinessInfoMapper.selectPayerBusinessInfoById(payerBusinessId);
	}
	
	/**
     * 查询支付商商户列表
     * 
     * @param payerBusinessInfo 支付商商户信息
     * @return 支付商商户集合
     */
	@Override
	public List<PayerBusinessInfo> selectPayerBusinessInfoList(PayerBusinessInfo payerBusinessInfo)
	{
	    return payerBusinessInfoMapper.selectPayerBusinessInfoList(payerBusinessInfo);
	}
	
    /**
     * 新增支付商商户
     * 
     * @param payerBusinessInfo 支付商商户信息
     * @return 结果
     */
	@Override
	public int insertPayerBusinessInfo(PayerBusinessInfo payerBusinessInfo)
	{
	    return payerBusinessInfoMapper.insertPayerBusinessInfo(payerBusinessInfo);
	}
	
	/**
     * 修改支付商商户
     * 
     * @param payerBusinessInfo 支付商商户信息
     * @return 结果
     */
	@Override
	public int updatePayerBusinessInfo(PayerBusinessInfo payerBusinessInfo)
	{
	    return payerBusinessInfoMapper.updatePayerBusinessInfo(payerBusinessInfo);
	}

	/**
     * 删除支付商商户对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deletePayerBusinessInfoByIds(String ids)
	{
		return payerBusinessInfoMapper.deletePayerBusinessInfoByIds(Convert.toStrArray(ids));
	}
	
}
